<template>
  <div class="factory-view">
    <div class="loading-overlay" v-if="loading">
      <el-spin :loading="true" size="large">正在加载数据...</el-spin>
    </div>
    
    <factory-dashboard v-else />
  </div>
</template>

<script setup>
import { ref, onMounted } from 'vue'
import FactoryDashboard from '../components/FactoryDashboard.vue'

const loading = ref(true)

onMounted(() => {
  // 模拟数据加载
  setTimeout(() => {
    loading.value = false
  }, 1000)
})
</script>

<style scoped>
.factory-view {
  
  width: 100%;
  min-height: 100vh;
  background-color: #001529;
  position: relative;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 21, 41, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  color: #fff;
}
</style> 